<?php



class Bar{
	private $data = array();
	
	public function input($data){
		echo "//数据\n";
		$this->data = $data;
	}
	public function init(){
		echo "//初始化\n";
	}
	public function output($name){
		echo "//输出\n";
		echo "var {$name}=".json_encode($this->data).';';
	}
}
